Update crossbuilding rules
authorXimin Luo <infinity0@debian.org>
Wed, 3 May 2017 14:55:29 +0000 (16:55 +0200)
committerXimin Luo <infinity0@debian.org>
Wed, 3 May 2017 14:55:29 +0000 (16:55 +0200)
- Remove redundant stuff like the libc-dev extra dep and DEB_BUILD_OPTIONS
- Add rules for using buildd incoming repos, sometimes it's needed

debian/rules

index 08332cbaafd8fa8ef21e016bbf55608b67e1299f..66df02848b741902500a989fc043bf91a5a99ab0 100755 (executable)
@@ -86,18 +86,21 @@ override_dh_auto_clean:
 # TODO: rm after the freeze
        -$(RM) -rf vendor/libgit2-sys-0.6.6/libgit2
 
-CROSS_SBUILD = DEB_BUILD_OPTIONS=nocheck sbuild --profiles=nocheck \
+CROSS_SBUILD = sbuild --profiles=nocheck \
          --build-failed-commands '%SBUILD_SHELL' \
-         --add-depends=libc-dev:$(DEB_HOST_ARCH) \
-         $(EXTRA_SBUILD_FLAGS) \
          --host=$(DEB_HOST_ARCH) \
-         --no-arch-all
+         --no-arch-all $(EXTRA_SBUILD_FLAGS)
+
+SBUILD_REPO_EXPERIMENTAL = --extra-repository="deb http://httpredir.debian.org/debian experimental main"
+
+# Sometimes this is necessary, if the mirrors have different versions for different architectures
+ifeq (1,$(SBUILD_USE_INCOMING))
+CROSS_SBUILD += --extra-repository="deb http://incoming.debian.org/debian-buildd buildd-unstable main"
+SBUILD_REPO_EXPERIMENTAL += --extra-repository="deb http://incoming.debian.org/debian-buildd buildd-experimental main"
+endif
 
 crossbuild:
        $(CROSS_SBUILD) .
 
 crossbuild-experimental:
-       $(CROSS_SBUILD) \
-         --extra-repository='deb http://httpredir.debian.org/debian experimental main' \
-         --build-dep-resolver=aspcud \
-         .
+       $(CROSS_SBUILD) $(SBUILD_REPO_EXPERIMENTAL) --build-dep-resolver=aspcud .